package com.zc.controller.zjx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 张佳欣
 */
@RestController
@RequestMapping("zjx")
public class ZjxController {
    @Autowired
    ZjxService zjxservice;

    @RequestMapping("zjxhello")
    @ResponseBody
    public String hello(){
        return "hello";
    }

    @RequestMapping("zjxquery")
    @ResponseBody
    public List<Map> zjxquery(){
        List<Map> list = zjxservice.zjxquery();
        return list;
    }

    @RequestMapping("zjxadd")
    @ResponseBody
    public String zjxadd(ZjxPojo zjxStudent){
        zjxservice.zjxadd(zjxStudent);
        return "1";
    }

    @RequestMapping("zjxdelete")
    @ResponseBody
    public String zjxdelete(ZjxPojo zjxPojo){
        zjxservice.zjxdelete(zjxPojo);
        return "1";
    }

    @RequestMapping("zjxupdate")
    @ResponseBody
    public String zjxupdate(ZjxPojo zjxPojo){
        zjxservice.zjxupdate(zjxPojo);
        return "1";
    }
}
